1. Field of the Invention
The present invention relates to an image processing apparatus that stores print data in a cache memory, a method of controlling the same, and a storage medium.
2. Description of the Related Art
In recent years, an SFP (Single Function Printer) uses, as a secondary storage device, e.g. an SD card formed by a semiconductor storage device in place of an HDD, to thereby reduce costs and downsize a printed circuit board.
The SFP has several functions that can be used only after employing the secondary storage device. Examples of the several functions include a secure job function which adds a password to print data from an external information apparatus, and permits the print data to be printed only after the password is input via an operation section of the SFP.
Further, the examples of the several functions include a box storage job function which is capable of storing the print data from the external information apparatus in the secondary storage device of the SFP and printing the stored print data at any desired time by operating the SFP.
The examples of the several functions further includes an interrupt printing function which can change a printing order when a plurality of print data items are input to the SFP for executing a large amount of print jobs.
To realize the above-described functions, it is necessary to store print data input to the SFP in the secondary storage device.
For example, to realize the interrupt printing function, it is necessary to temporarily store all of received print data items even if they are those of jobs with ordinary attributes and without any job header indicating storage attributes, such as a secure job and a box storage job.
To this end, a conventional image forming apparatus is configured such that if print data items having a predetermined or larger size are input to the image forming apparatus, they are uniformly stored in a secondary storage device irrespective of a job type thereof. Therefore, if the secondary storage device is changed from an HDD to an SD card, the print data items are stored in the SD card.
By the way, the SD card is not much different from the HDD in sequential access performance.
However, it is generally known that the SD card is lower in the performance of random access to data having sizes not larger than the read or write unit size of a semiconductor storage device thereof due to its difference in the internal structure from the HDD.
Particularly, as far as the random access performance is concerned, it is generally known that the write access is lower in performance than the read access.
Therefore, in the conventional image forming apparatus, to suppress the random access performance from lowering, the image forming apparatus uses a RAM as a cache memory of the SD card.
Further, as a method of operation of the cache memory, a write-back cache method is employed in which data is collectively written into the SD card asynchronously to writing of data into the cache memory, whereby high-speed access is realized to maintain printing performance.
FIG. 8 is a diagram useful in explaining the write-back cache method and a write-through cache method.
In FIG. 8, “File” corresponds to print data input to the image forming apparatus, “Cache” corresponds to the RAM of the image forming apparatus, and “SD” corresponds to the secondary storage device of the image forming apparatus.
The write-back cache method is a method of storing print data in the SD after temporarily storing the print data in the cache.
On the other hand, the write-through cache method is a method of storing print data in the cache and in the SD at the same time.
The former is capable of processing print data at high speed although coherency between print data stored in the cache and print data stored in the SD is not maintained. The latter is lower in speed than the former although coherency between print data stored in the cache and print data stored in the SD is maintained.
Further, there has been conventionally proposed a technique of automatically identifying the type of a job, and setting an optimum job schedule according to the identified type of the job, to thereby automate the input and execution of the job (see e.g. Japanese Patent Laid-Open Publication No. H05-313921).
In the above conventional technique, however, to realize high-speed access, the RAM of the image forming apparatus is used as the cache memory of the SD card, and the write-back cache method is employed.
For this reason, when large-volume print data is stored, printing performance is improved, but the frequency of cache flushing is increased so as to establish coherency between the SD card and the RAM.
Particularly when large-volume print data is printed, and then cache flushing to the SD card is collectively executed, the operability of the image forming apparatus is largely affected.
FIG. 9 is a diagram of a time period required by a conventional technique after termination of printing and before displaying a usable screen indicating that the image forming apparatus has become usable by the user.
As shown in FIG. 9, writing to the cache by the write-back method is executed several times before termination of printing, and flushing of the cache is collectively executed after termination of the printing.
This hinders processing of an operation section of the image forming apparatus from being made free until file system processing of the SD card is completed. Therefore, as shown in FIG. 9, it takes long before the usable screen is displayed after termination of the printing.
Although in the secure job and the box storage job which use print data also after termination of printing thereof, the cache flushing after termination of printing is necessary processing, the cache flushing is not required in the case of print data of a job having normal attributes which does not use print data after termination of printing thereof.
As a countermeasure to solve the above-described problem, it is envisaged to change the method employed by the image forming apparatus from the write-back cache method to the write-through cache method.
According to this countermeasure, although the frequency of cache flushing after termination of printing is reduced, cache flushing occurs even during printing, and hence printing performance is lowered.
Further, even when input and execution of a job is automated by identifying a type of the job, as disclosed in Japanese Patent Laid-Open Publication No. H05-313921, it is impossible to improve degraded performance for which cache flushing after termination of printing is responsible while maintaining the printing performance.